/*******************************************************************************
 * Copyright (c) 2008 meihuichina.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/

package org.langqiao.proxy.dynamicproxy2;

import java.lang.reflect.Proxy;

/**
 * 
 */

public class MyProxyFactory {
	public static Object getProxy(Object target) throws Exception{
		MyInvocationHandler handler = new MyInvocationHandler();
		handler.setTarget(target);
		return Proxy.newProxyInstance(target.getClass().getClassLoader(),target.getClass().getInterfaces(), handler);
	}
}
